<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span> {:__('类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[type]', [1=>'订阅号',3=>'公众号'], 1, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label for="wxname" class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span> {:__('名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="wxname" name="row[wxname]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="appid" class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span> {:__('App ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="appid" class="form-control" id="appid" name="row[appid]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="appsecret" class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span> {:__('App Secret')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="appsecret" name="row[appsecret]" autocomplete="off" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="contact" class="control-label col-xs-12 col-sm-2"><span style="color: red"></span> {:__('联络人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="contact" name="row[contact]" autocomplete="off" value="" />
        </div>
    </div>
    <div class="form-group">
        <label for="token" class="control-label col-xs-12 col-sm-2"><span style="color: red"></span> {:__('Token')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="token" name="row[token]" autocomplete="off" value="{$token|htmlentities}" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"> {:__('复制资料')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control selectpicker" name="wechatId">
                <option value="">选择公众号</option>
            <?php foreach($wechats as $id=>$wxname):?>
                <option value="{$id}">{$wxname}</option>
            <?php endforeach;?>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"> </label>
        <div class="col-xs-12 col-sm-8">
            <input type="checkbox" name="w[]" value="menu"> 微信菜单  
            <input type="checkbox" name="w[]" value="follow"> 被关注回复  
            <input type="checkbox" name="w[]" value="message"> 收到消息回复 
            <input type="checkbox" name="w[]" value="keywork"> 关键词回复   
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>